def pramsDectors(flag):
    def decorator(fn):
        def innner(*args, **kwargs):
            if flag == "+":
                print("正在努力加.....")
            else:
                print("正在努力减.....")
            num = fn(*args, **kwargs)
            return num

        return innner

    return decorator


@pramsDectors("+")
def sumFun(num1, num2):
    sum = num1 + num2
    print("sum:", sum)


@pramsDectors("-")
def sumFunmax(*args, **kwargs):
    sum = 0
    for value in args:
        sum -= value
    for value in kwargs.values():
        sum -= value
    print("sum:", sum)
    return sum


sumFun(1, 2)
sumFunmax(1000, 20, 100, a=500)
